<?php echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $language; ?>" xml:lang="<?php echo $language; ?>">
<head>
<title>Print</title>
<base href="<?php echo $base; ?>" />
<link rel="stylesheet" type="text/css" href="view/stylesheet/invoice.css" />
</head>
    <body  onload="window.print()">
    <h1 style="margin-left: 200px">Hóa Đơn Khách Hàng</h1>
    <p style="margin-left: 200px">Họ Và Tên: <?php echo $hoten?></p>
    <p style="margin-left: 200px">Số Điện Thoại: <?php echo $sdt ?></p>
    <p style="margin-left: 200px">Ngày in: <?php echo $time ?></p>
    <div>       
        <table border="1" cellpadding="10" style="width:100%;">
          <tr>
              <th style="width: 30%">Mặt Hàng</th>
            <th>Số Lượng</th>
            <th>Số Tiền</th>            
          </tr>     
            <?php foreach ($detailed as $detail) { ?>
             <tr>
             <td ><?php echo $detail['name']?></td>  
            <td style="text-align:center;"><?php echo $detail['quantity']; ?></td>
            <td style="text-align:center;"><?php echo $detail['amount']?></td>            
            <?php } ?>
             </tr>    
       </table>
        <div>
            <p style="margin-left: 500px;font-size: 20px">Tổng Tiền: <?php echo $tongtien ?></p>
        </div>
   </div>     
</body>
</html>